# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=easyfuzzer
pkgver=3.6
pkgrel=8
groups=('blackarch' 'blackarch-fuzzer' 'blackarch-webapp')
pkgdesc='A flexible fuzzer, not only for web, has a CSV output for efficient output analysis (platform independent).'
arch=('any')
url='http://www.mh-sec.de/downloads.html.en'
license=('custom:unknown')
depends=('perl' 'perl-io-socket-ip')
source=("http://www.mh-sec.de/downloads/$pkgname-$pkgver.tar.gz"
        'easyfuzzer.pl.patch')
sha512sums=('3082fa16b8a1c1121fa9b39618aec54695c52dd9ee6d34a42c871160fbbd8e6757c839f6294d121e3394717bd96ad7ba2fec7236f3a9be8c4b995819f176e2b6'
            'd3b53cce036a35911c8b67d8f231855398e133b4cca1563d1c8b776bb1aa703feacd9a83dca37a691f6060fc54f81dded9360a2f614f58c7e6f85f70d8d0307f')

prepare() {
  patch -p1 < "$pkgname.pl.patch"
}

package() {
  cd $pkgname

  for f in *.pl ; do
    install -Dm 755 "$f" "$pkgdir/usr/bin/${f%.*}"
  done

  install -Dm 644 header.txt "$pkgdir/usr/share/$pkgname/header.txt"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.easyfuzzer
}

